#pragma once

#include <qstring.h>
#include <qlist.h>
#include "common.h"

class QSettings;
class ServerRecord : public Singleton<ServerRecord>
{
public:
	struct Server {
		QString number;
		QString appName;
		QString appPath;
		bool enableGuard;
	};

public:
	ServerRecord();

	void setIniFile(QString file);

	void writeServer(Server server);
	void writeEnableGuard(QString number, bool status);
	QList<Server> readAllServer();
	void clearAllServer();

private:
	QString fileName_;
	QSettings* settings_;
};

